package guestbook.ui;

import guestbook.rest.ApiGuestbookEntry;

import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.event.shared.EventBus;
import com.google.inject.Inject;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.NameToken;
import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
import com.gwtplatform.mvp.client.proxy.ProxyPlace;
import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;

public class MainPagePresenter extends 
Presenter<MainPagePresenter.MyView, MainPagePresenter.MyProxy> {
	
	ApiGuestbookEntry apiGuestbookEntry;

  public interface MyView extends View {}
 
  @ProxyCodeSplit
  @NameToken("main")
  public interface MyProxy extends ProxyPlace<MainPagePresenter> {}
  
  @Inject
  public MainPagePresenter(ApiGuestbookEntry apiGuestbookEntry, EventBus eventBus, MyView view, MyProxy proxy) {
    super(eventBus, view, proxy);
    
    this.apiGuestbookEntry = apiGuestbookEntry;
  }

  @Override
  protected void revealInParent() {
    RevealRootContentEvent.fire( this, this );
  }
}
